package com.spzx.common.rabbitmq.configure;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.amqp.rabbit.connection.CorrelationData;



//自定义的扩展类 继承rabbit提供的CorrelationData 用来设置参数
@Data
@Schema(description = "mq消息重试扩展类")
public class SpzxCorrelationData extends CorrelationData {
    private String exchange;
    private String routingKey;
    private Object message;
    @Schema(description = "是否需要重新发送消息")
    private boolean retry = true;
    @Schema(description = "重新发送消息的次数阈值")
    private int retryLimit = 3;
    @Schema(description = "重试的时间间隔 毫秒")
    private long timeIntervel = 100;
    @Schema(description = "重试的次数")
    private int count = 0;

}